<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>商品信息管理</title>
  </head>
  <body>
    <?php include("menu.php"); //引入导航栏 ?>
    <h3 align="center">发布商品信息</h3>
    <form  action="action.php?action=add" enctype="multipart/form-data" method="post">
    <table border="1" width="500" align="center">
      <tr>
        <td align="right">名称：</td>
        <td><input type="text" name="name" ></td>
      </tr>
      <tr>
        <td align="right">类型：</td>
        <td>
            <select  name="typeid">
              <?php
                include("dbconfig.php");
                foreach ($typelist as $k => $v) {
                  echo "<option value='{$k}'>{$v}</option>";
                }
              ?>
            </select>
        </td>
      </tr>
      <tr>
        <td align="right">单价：</td>
        <td><input type="text" name="price" ></td>
      </tr>
      <tr>
        <td align="right">库存：</td>
        <td><input type="text" name="total" ></td>
      </tr>
      <tr>
        <td align="right">图片：</td>
        <td><input type="file" name="pic" ></td>
      </tr>
      <tr>
        <td align="right" valign="top">描述：</td>
        <td><textarea name="note" rows="5" cols="20"></textarea></td>
      </tr>
      <tr>
        <td colspan="2" align="center">
          <input type="submit" name="提交">&nbsp;
          <input type="reset" name="重置">
        </td>
      </tr>
    </table>
    </form>
  </body>
</html>
